package com.example.yoho.utils;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.example.yoho.R;

public class MyGlide {

    public static void GlideFor(Context context, String path, ImageView imageView){
        Glide.with(context).load(path).placeholder(R.mipmap.ic_launcher).error(R.mipmap.ic_launcher).into(imageView);
    }

    public static void GlideCirclye(Context context,String path,ImageView imageView){
        Glide.with(context).load(path).apply(new RequestOptions().circleCrop()).placeholder(R.mipmap.ic_launcher).error(R.mipmap.ic_launcher).into(imageView);
    }
    public static void GlideIntCirclye(Context context,int path,ImageView imageView){
        Glide.with(context).load(path).apply(new RequestOptions().circleCrop()).placeholder(R.mipmap.ic_launcher).error(R.mipmap.ic_launcher).into(imageView);
    }
    public static void GlideAS(Context context, Object path, ImageView imageView){
        Glide.with(context).load(path).placeholder(R.mipmap.ic_launcher).error(R.mipmap.ic_launcher).into(imageView);
    }

}
